#pragma once
#include"../comm/timehelper.hpp"
#include"loglevel.hpp"
#include<string>
#include<thread>
/*该模块主要是消息的描述
消息的描述:时间、等级、线程id、文件名、行号、日志器名称、body
*/

namespace ns_logger{
    struct LogMsg{
        public:
            LogMsg(LogLevel::value level,const std::string &file,size_t line,
                    const std::string &name,const std::string &payload)
                :_level(level), _file(file),_line(line),_name(name),_payload(payload)
            {
                _time=ns_helper::TimeUntil::GetTime();
                _tid=std::this_thread::get_id();
            }
        public:
            time_t _time;
            size_t _line;
            std::string _file;
            LogLevel::value _level;
            std::thread::id _tid;
            std::string _name;
            std::string _payload;
    };
}